<?php
header('content-type: text/html; charset=utf-8');
// 1. gibt es überhaupt Ergebnisse?
$i=0;
if ($this->recipes OR $this->ingredients OR $this->tags){
	$config = Zend_Registry::get('config');
	// Für die Suche nach Cocktailnamen
	if($this->search_type=='name') {	
		foreach ($this->recipes as $recipe){
			?><div class="pointer" id="searchValue<?php print $i; ?>"><?php 
	        echo $this->escape(str_replace('\\','',$recipe->name));
	        ?></div><?php print "\n";
	        $i++;
        }
    } else if($this->search_type=='ingredient') {
        // Für die Suche nach Zutaten
        foreach ($this->ingredients as $ingredient){
			?><div class="pointer" id="searchValue<?php print $i; ?>"><?php
	        echo $this->escape(str_replace('\\','',$ingredient->name));
	        ?></div><?php print "\n";
	        $i++;
        }
    } else if($this->search_type=='tag') {
        // Für die Suche nach Tags
        foreach ($this->tags as $tag){
			?><div class="pointer" id="searchValue<?php print $i; ?>"><?php
	        echo $this->escape(str_replace('\\','',$tag->name));
	        ?></div><?php print "\n";
	        $i++;
        }
    }
} else { ?><div class="pointer" id="searchValue<?php print $i; ?>">Keine Treffer.</div><?php print "\n"; } ?>
